home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / DINKDEMO / DC_TEXTE / DTEDITAP.C next >
Text File  |  1992-07-08  |  682b  |  44 lines

  1. /*
  2.     File:        DTEditApp.c
  3.  
  4.     Written by:    Mark Gross
  5.  
  6.     Copyright:    ⌐ 1992 by Applied Technical Software, all rights reserved.
  7.     Use at your own risk.
  8.  
  9. */
  10.  
  11. //This is the class deffinition of the DScribbleApplication
  12.  
  13. #include "DTEditApp.h"
  14. #include "DTEditDoc.h"
  15.  
  16.  
  17. DDocument* DTEditApp::MakeDDoc(Boolean OpenFromFile)
  18. {
  19.     DTEditDoc *New;
  20.     
  21.     New = new DTEditDoc;
  22.  
  23.             // if OpenFromFile == FALSE then it will 
  24.             // not read from any file
  25.     if(New->Init(OpenFromFile)) 
  26.     {
  27.         if ( fTarget = New->MakeWindow(FALSE) )
  28.             ((DWindow *) fTarget)->SetWindowTitle();
  29.             
  30.         else
  31.             fTarget = New; // window not created
  32.     }
  33.     else
  34.     {
  35.         fTarget = this;
  36.         SelectWindow( FrontWindow());
  37.     }
  38.     return New;
  39. }
  40.  
  41.  
  42.  
  43.  
  44.